package persistence;

import java.io.Serializable;
import javax.persistence.*;
import java.sql.Timestamp;


/**
 * The persistent class for the Firm_has_Owner database table.
 * 
 */
@Entity
public class Firm_has_Owner implements Serializable {
	private static final long serialVersionUID = 1L;
	private Firm_has_OwnerPK id;
	private Timestamp acquired;
	private byte control;
	private String directOwner;
	private String ownership;
	private String ownerTitle;
	private byte pr;
	private String type;
	private Firm firm;
	private Owner owner;

    public Firm_has_Owner() {
    }


	@EmbeddedId
	public Firm_has_OwnerPK getId() {
		return this.id;
	}

	public void setId(Firm_has_OwnerPK id) {
		this.id = id;
	}
	

	public Timestamp getAcquired() {
		return this.acquired;
	}

	public void setAcquired(Timestamp acquired) {
		this.acquired = acquired;
	}


	public byte getControl() {
		return this.control;
	}

	public void setControl(byte control) {
		this.control = control;
	}


	public String getDirectOwner() {
		return this.directOwner;
	}

	public void setDirectOwner(String directOwner) {
		this.directOwner = directOwner;
	}


	public String getOwnership() {
		return this.ownership;
	}

	public void setOwnership(String ownership) {
		this.ownership = ownership;
	}


	public String getOwnerTitle() {
		return this.ownerTitle;
	}

	public void setOwnerTitle(String ownerTitle) {
		this.ownerTitle = ownerTitle;
	}


	public byte getPr() {
		return this.pr;
	}

	public void setPr(byte pr) {
		this.pr = pr;
	}


	public String getType() {
		return this.type;
	}

	public void setType(String type) {
		this.type = type;
	}


	//bi-directional many-to-one association to Firm
    @ManyToOne
	@JoinColumns({
		@JoinColumn(name="Firm_crd", referencedColumnName="crd",insertable=false,updatable=false),
		@JoinColumn(name="Firm_idFirm", referencedColumnName="idFirm",insertable=false,updatable=false)
		})
	public Firm getFirm() {
		return this.firm;
	}

	public void setFirm(Firm firm) {
		this.firm = firm;
	}
	

	//bi-directional many-to-one association to Owner
    @ManyToOne
	@JoinColumn(name="Owner_idOwner",insertable=false,updatable=false)
	public Owner getOwner() {
		return this.owner;
	}

	public void setOwner(Owner owner) {
		this.owner = owner;
	}
	
}